package co.edu.uniandes.sd.interfaz;

import java.awt.Component;

import javax.swing.JTabbedPane;
import javax.swing.border.TitledBorder;

public class PanelPrincipal extends JTabbedPane
{

    private InterfazCliente principal;

    public PanelPrincipal( InterfazCliente interfaz )
    {
        setBorder( new TitledBorder( "Funciones" ) );

        principal = interfaz;
    }

    public void setEnabled( boolean param )
    {
        Component[] coleccion = getComponents( );
        for( int i = 0; i < coleccion.length; i++ )
        {
            Component temp = coleccion[ i ];
            temp.setEnabled( param );
        }
        for( int i = 0; i < getTabCount(); i++ )
        {
            setEnabledAt(i, param);
        }
    }
}
